package com.qh.cqac.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qh.cqac.entity.IAS;
import com.qh.cqac.entity.pojo.Ins;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IasMapper extends BaseMapper<IAS> {
    @Select("select iid AS id,AVG(score) AS avg from ias where type=#{type} GROUP BY iid")
    public List<Ins> findAvg(@Param("type") Integer type);
}
